<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- <script src="./webpack.js"></script> -->
</head>

<body>

  <script>
    function fibonacci(n) {
      if (n<=2) {
        return n
      };
      return fibonacci(n - 2) + fibonacci(n - 1);
    }
    console.log(fibonacci(5));

    // function f(n, a1 = 1, a2 = 1) {
    //   if (n <= 1) { return a1 };
    //   return f(n - 1, a2, a1 + a2);
    // }
    // console.log(f(5));

    // function fibonacci(n) {
    //   if (n == 0) return 0
    //   else if (n == 1) return 1
    //   else return fibonacci(n - 1) + fibonacci(n - 2)
    // }
  </script>
</body>

</html>